home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19990725-20000114 / 000442_news@columbia.edu _Tue Jan 11 17:54:29 2000.msg < prev    next >
Internet Message Format  |  2020-01-01  |  3KB

  1. Return-Path: <news@columbia.edu>
  2. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
  3.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id RAA10188
  4.     for <kermit.misc@watsun.cc.columbia.edu>; Tue, 11 Jan 2000 17:54:29 -0500 (EST)
  5. Received: (from news@localhost)
  6.     by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id RAA18863
  7.     for kermit.misc@watsun.cc.columbia.edu; Tue, 11 Jan 2000 17:53:02 -0500 (EST)
  8. X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
  9. From: jaltman@watsun.cc.columbia.edu (Jeffrey Altman)
  10. Subject: Re: FTP over C-kermit
  11. Date: 11 Jan 2000 22:53:01 GMT
  12. Organization: Columbia University
  13. Message-ID: <85gc8d$id1$1@newsmaster.cc.columbia.edu>
  14. To: kermit.misc@columbia.edu
  15.  
  16. In article <85ga7s$gc4$1@newsmaster.cc.columbia.edu>,
  17. Frank da Cruz <fdc@watsun.cc.columbia.edu> wrote:
  18. : In article <387BA8C9.40F54E02@seanet.com>,
  19. : Peter Burkholder  <peter@geophys.washington.edu> wrote:
  20. : : Can I use C-kermit to pick up files from an 
  21. : : FTP server?  I'd like to use C-kermit to 
  22. : : access a set of seismic data loggers.  When 
  23. : : I connect to the loggers using telnet protocol,
  24. : : I can specify the data I want, and I'm supplied
  25. : : with a filename that I can pick up over ftp.
  26. : : 
  27. : : Clearly, I'd like to automate all this using
  28. : : kermit - making the request, getting the filename
  29. : : and picking up the file using ftp.  But it's the
  30. : : last step that confuses me.
  31. : :
  32. : And well it might!
  33. : Although FTP uses a Telnet connection for its
  34. : control channel, it uses a separate connection for
  35. : data.  So, unfortunately, you can't script a session
  36. : with an FTP server in Kermit.
  37. : Built-in FTP support is an oft-requested feature and,
  38. : like many others, it's on our list.
  39.  
  40. Actually until we have built in FTP support you can use C-Kermit 7.0
  41. with its scripting and PTY support to handle the job on most Unix 
  42. platforms.
  43.  
  44. First, automate the Telnet connection using 
  45.  
  46.   SET NETWORK TYPE TCP/IP
  47.   SET HOST <host> telnet
  48.  
  49. followed by INPUT and OUTPUT commands to retrieve the name of the 
  50. file to be retrieved.  Once you have the filename you can close the
  51. telnet connection and use the new PTY support to control FTP.
  52.  
  53.   CLOSE CONNECTION
  54.   SET NETWORK TYPE PTY
  55.   SET HOST ftp <host>
  56.  
  57. The ftp application has now been started under the control of Kermit's
  58. script language.  You now use Kermit's INPUT and OUTPUT commands to
  59. script the session
  60.  
  61.   INPUT 5 ftp>
  62.   IF FAILURE END Could not start FTP
  63.   OUTPUT open <host>\10
  64.   INPUT 5 Name
  65.   OUTPUT anonymous\10
  66.   INPUT 5 Password
  67.   OUTPUT yourname@host\10
  68.   INPUT 5 ftp>
  69.   OUTPUT get \v(myfile)\10
  70.   INPUT 5 226 Transfer complete
  71.   OUTPUT quit\10
  72.   CLOSE CONNECTION
  73.  
  74. This code is not complete and does not perform all of the error checking
  75. that should be performed but it will give you the general idea.  PTY
  76. support is provided on all of the major modern Unix distributions
  77. include Linux, AIX, Solaris, SunOS, HPUX, ...
  78.  
  79.  
  80.  
  81.     Jeffrey Altman * Sr.Software Designer * Kermit-95 for Win32 and OS/2
  82.                  The Kermit Project * Columbia University
  83.               612 West 115th St #716 * New York, NY * 10025
  84.   http://www.kermit-project.org/k95.html * kermit-support@kermit-project.org